//
// Created by HP on 2024/3/14.
//

#ifndef AURORA_ST_AURORA_PID_H
#define AURORA_ST_AURORA_PID_H

#include "common_inc.h"
class Aurora_PID{

public:
    void Init();

    float cal_PID(float actual_value);
    float cal_PI(float actual_value);
    float cal_PI_AntiSaturation(float actual_value);


    void set_desireValue(float value);
    void set_PID(float P , float I , float D);
    void set_P(float P);
    void set_I(float I);
    void set_D(float D);

    void set_Iintegral_Limit(float limit);
public:
    float _P;
    float _I;
    float _D;

    float _desired_value;

    float _error;
    float _last_error;
    float _acc_integral;  //累计积分
    float _P_temp;
    float _I_temp;

    float I_integral_MaxLimit; //积分限幅
    float I_integral_MinLimit; //积分限幅
};



#endif //AURORA_ST_AURORA_PID_H
